package com.heima.redisso.listener;


import com.heima.redisso.task.TestTasks;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;


@Service
public class RedisListener {

    @Autowired
    private TestTasks testTasks;

    @PostConstruct  // 启动时自动执行该任务
    public void handleMessage() throws InterruptedException {
        testTasks.handleMessage();
    }
}
